//
//  SLOptionChooseView.h
//  SulitLoanDemo
//
//  Created by 虞嘉伟 on 2025/2/22.
//

#import "SLInformationAlertView.h"
#import "SLCommonOptionChooseCell.h"
#import "SLIDCardOptionChooseCell.h"
#import "SLInformationOptionChooseCell.h"


NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, SLOptionChooseViewType) {
    SLOptionChooseViewTypeCommon,
    SLOptionChooseViewTypeIDCard,
    SLOptionChooseViewTypeInformation
};


@interface SLOptionChooseView : UIView

@property (nonatomic, copy  ) void(^itemViewCallback)(__kindof UITableViewCell *item, NSInteger index);

@property (nonatomic, copy  ) void(^confirmButtonCallback)(NSInteger index);

@property (nonatomic, assign) SLOptionChooseViewType type;

@property (nonatomic, assign) NSUInteger count;

- (void)dismiss;

@end



@interface SLOptionChooseView (Fast)

/// Common类型选择弹窗
/// - Parameters:
///   - count: 数量
///   - itemViewCallback: 视图回调
///   - confirmButtonCallback: 确认按钮点击回调
+ (instancetype)showOptionCommonChooseWithCount:(NSInteger)count itemViewCallback:(void(^)(SLCommonOptionChooseCell *item, NSInteger index))itemViewCallback confirmCallback:(void(^)(NSInteger index))confirmButtonCallback;

- (void)showOptionCommonChooseWithCount:(NSInteger)count itemViewCallback:(void(^)(SLCommonOptionChooseCell *item, NSInteger index))itemViewCallback confirmCallback:(void(^)(NSInteger index))confirmButtonCallback;


/// IDCard类型选择弹窗
/// - Parameters:
///   - count: 数量
///   - itemViewCallback: 视图回调
///   - confirmButtonCallback: 确认按钮点击回调
+ (instancetype)showOptionIDCardChooseWithCount:(NSInteger)count itemViewCallback:(void(^)(SLIDCardOptionChooseCell *item, NSInteger index))itemViewCallback confirmCallback:(void(^)(NSInteger index))confirmButtonCallback;

- (void)showOptionIDCardChooseWithCount:(NSInteger)count itemViewCallback:(void(^)(SLIDCardOptionChooseCell *item, NSInteger index))itemViewCallback confirmCallback:(void(^)(NSInteger index))confirmButtonCallback;



/// Information类型选择弹窗
/// - Parameters:
///   - count: 数量
///   - itemViewCallback: 视图回调
///   - confirmButtonCallback: 确认按钮点击回调
+ (instancetype)showOptionInformationChooseWithCount:(NSInteger)count itemViewCallback:(void(^)(SLInformationOptionChooseCell *item, NSInteger index))itemViewCallback confirmCallback:(void(^)(NSInteger index))confirmButtonCallback;

- (void)showOptionInformationChooseWithCount:(NSInteger)count itemViewCallback:(void(^)(SLInformationOptionChooseCell *item, NSInteger index))itemViewCallback confirmCallback:(void(^)(NSInteger index))confirmButtonCallback;
@end
NS_ASSUME_NONNULL_END
